package com.tzxx.spider.spiderbots.base;


import com.tzxx.spider.core.TypeEnum;
import com.tzxx.spider.core.exception.SpiderNotFoundException;
import com.tzxx.spider.domain.Template;
import com.tzxx.spider.spiderbots.DetailSpider;

/**
 * 文章详情爬取工厂类
 *
 * @author tzxx
 */
public class ParseDetailFactory {

    private ParseDetailFactory() {}

    public static BaseUrlDetailSpider getSpider(Template template) {
        if (TypeEnum.List_ORDERING.getValue() == template.getType()) {
            return new DetailSpider(template);
        } else if (TypeEnum.Detail_ORDERING.getValue() == template.getType()) {

        }
        throw new SpiderNotFoundException();
    }
}
